package org.ruanjj.multithread;

//消费者
public class Consumer implements Runnable{
    private Clerk clerk;

    public Consumer(Clerk clerk){
        this.clerk = clerk;
    }

    @Override
    public void run() {
        while(true){
            System.out.println(Thread.currentThread().getName()+"进行消费:" +clerk.goods);
            clerk.delete();
        }
    }
}
